﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Enter.Entity;
using System.ServiceModel;
using System.Data;
using Enter.Config;

namespace Enter.Services.Mail
{
    public partial interface IMail
    {
        #region 购物车

        /// <summary>
        /// 添加购物车
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [OperationContract]
        bool AddCar(T303_Order_CartEntity entity);
       
        /// <summary>
        /// 添加购物车
        /// </summary>
        /// <param name="Entitys"></param>
        /// <returns></returns>
        [OperationContract]
        bool AddCar(List<T303_Order_CartEntity> Entitys);
        
        /// <summary>
        /// 清空用户购物车
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        bool ClareAll(int uID);
       /// <summary>
        /// 批量删除
        /// </summary>
        /// <returns></returns>
        bool DelCart(string ids, int UID);
        
        /// <summary>
        /// 修改购物车状态
        /// </summary>
        /// <returns></returns>
        bool UpdateCartStatus(int id, int UID, Enter.Entity.T303_Order_CartEntity.EnumStatus status);
        bool UpdateCartStatus(string ids, int UID, Enter.Entity.T303_Order_CartEntity.EnumStatus status);
          /// <summary>
        /// 修改购物车商品数量
        /// </summary>
        /// <param name="carID">购物车ID</param>
        /// <param name="goodNum">商品数量</param>
        /// <returns></returns>
        bool UpdateCartCount(int carID, int UID, int goodNum);
        
        
        /// <summary>
        /// 获取用户购物车
        /// </summary>
        /// <param name="uID"></param>
        /// <returns></returns>
       [OperationContract]
        DataTable GetUserCar(int uID);
       /// <summary>
       /// 获取用户购物车
       /// </summary>
       /// <param name="uID"></param>
       /// <returns></returns>
       [OperationContract]
       DataTable GetUserCar(int uID,string ids);
        #endregion

       #region 订单
       string GetOrderNo();
       
        /// <summary>
        /// 下单
        /// </summary>
        /// <param name="orders"></param>
        /// <returns></returns>
       bool AddUserOrder(List<T301_Order_MainEntity> orders);
        
        /// <summary>
        /// 获取用户订单
        /// </summary>
        /// <param name="uID">用户ID</param>
        /// <param name="orderstatus">订单状态</param>
        /// <param name="commentstatus">评论状态</param>
        /// <param name="prodtitle">商品名称</param>
        /// <param name="OrderTimeBegin">成交时间</param>
        /// <param name="OrderTimeEnd">成交时间</param>
        /// <param name="pageSize">每页显示条数</param>
        /// <param name="currentPageIndex">当前页</param>
        /// <param name="totalPages">总页数</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
       List<T301_Order_MainEntity> GetOrderByUid(int uID, EnumOrderStatus orderstatus, EnumCommentStatus commentstatus, string prodtitle, string OrderTimeBegin, string OrderTimeEnd, int pageSize, int currentPageIndex, out int totalPages, out int totalCount);
        
           /// <summary>
        /// 订单详情
        /// </summary>
        /// <param name="OMID"></param>
        /// <returns></returns>
       T301_Order_MainEntity GetOrderInfo(int OMID,int uID);
       #endregion
    }
}
